import { toLine } from './utils/index';
import { createApp } from 'vue'
import App from './App.vue'
import router from './router'

// 引入 element-plus 以及样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

// 引入自定义的组件
import fUI from './components'

const app = createApp(App)

// 引入 element-plus下单独的 icons
import * as Icons from '@element-plus/icons'
// 全局注册图标, 统一图标 命名规范 el-icon-xxx
for (let icon in Icons) {
  app.component(`el-icon-${toLine(icon)}`, (Icons as any)[icon])
}

app.use(router).use(ElementPlus).use(fUI)
app.mount('#app')
